package com.fc.mall.portal.service;

import com.fc.mall.model.PmsProduct;
import com.fc.mall.portal.domain.ProductQueryParam;
import com.fc.mall.portal.domain.PromotionProduct;
import com.fc.mall.portal.vo.PmsProductVO;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 商品管理Service
 * Created by dobuy on 2018/4/26.
 */
public interface ProductService {
    /**
     * 创建商品
     */
    @Transactional(isolation = Isolation.DEFAULT,propagation = Propagation.REQUIRED)
    /**
     * 根据商品编号获取信息
     */
    PmsProductVO getInfo(Long id);

    /**
     * 分页查询商品
     */
    List<PmsProductVO> list(ProductQueryParam productQueryParam, Integer pageSize, Integer pageNum);

    /**
     * 根据商品名称或者货号模糊查询
     */
    List<PmsProduct> list(String keyword);

    PromotionProduct queryByProductId(Long id);
}
